<%--
  Created by IntelliJ IDEA.
  User: Chuch
  Date: 2017/3/1
  Time: 11:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../common/taglibs.jsp" %>
<html>
<head>
    <title>Title</title>
    <script src="${ctx}/js/views/opcif/opcifIDCardAuthenticationApp.js"></script>
</head>
<body ng-app="myApp" style="overflow:scroll;overflow-x:hidden">

<core:import url="../common/pageHead.jsp">
    <core:param name="title" value="身份认证信息 "/>
</core:import>

<div ng-controller="queryCtrl" class="container-fluid">
    <form id="queryForm" name="queryForm" action="${ctx}/opcif/idcardAuthentication/search" role="form"
          autocomplete="off">
        <table class="table table-bordered table-condensed">
            <tr>
                <td>
                    身份证号:
                </td>
                <td>
                    <input type="text" ng-model="vm.queryBean.certNo" class="{{vm.constant.inputClass}}" />
                </td>
                <td>
                    认证结果:
                </td>
                <td>
                    <select ng-model="vm.queryBean.authStatus" class="{{vm.constant.inputClass}}" ng-options="item.key as item.value for item in vm.APPLY_STATUS" >
                        <option value="">请选择</option>
                    </select>

                </td>
                <td>
                    认证申请号:
                </td>
                <td>
                    <input type="text" ng-model="vm.queryBean.authApplyId" class="{{vm.constant.inputClass}}" />
                </td>
            </tr>
            <tr>
                <td>
                    用户编号:
                </td>
                <td>
                    <input type="text" ng-model="vm.queryBean.operatorNo" class="{{vm.constant.inputClass}}" />
                </td>
                <td>
                    认证申请时间:
                </td>
                <td colspan="3">
                    <input type="text" class="{{vm.constant.inputClass}}" style="width: 90px;" uib-datepicker-popup="yyyy-MM-dd"
                           ng-blur="vm.checkStartDay(vm.queryBean.applyStartDate,vm.queryBean.applyEndDate)"      ng-model="vm.queryBean.applyStartDate" />
                    -&nbsp;<input type="text" class="{{vm.constant.inputClass}}" style="width: 90px;" uib-datepicker-popup="yyyy-MM-dd"
                                  ng-blur="vm.checkEndDay(vm.queryBean.applyStartDate,vm.queryBean.applyEndDate)"    ng-model="vm.queryBean.applyEndDate" />
                </td>
            </tr>
            <tr align="center">
                <td colspan="6">
                    <button type="button" ng-click="vm.queryDetail()" class="btn btn-default">查询</button>
                    <button type="button" ng-click="vm.resetForm()" class="btn btn-default">重置</button>
                </td>
            </tr>
        </table>
    </form>

    <div>
        <table table-detail>
            <thead>
            <tr>
                <th>序号</th>
                <th>认证申请编号</th>
                <th>用户号</th>
                <th>客户号</th>
                <th>证件号</th>
                <th>证件名</th>
                <th>认证状态</th>
                <%--<th>认证描述</th>--%>
                <th>申请渠道</th>
                <th>申请时间</th>
                <th>审核时间</th>
                <th>审核人</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody ng-repeat="bean in vm.pagination.list track by $index">
            <tr>
                <td>{{$index+1}}</td>
                <td>{{bean.authApplyId}}</td>
                <td>{{bean.operatorNo}}</td>
                <td>{{bean.customerNo}}</td>
                <td>{{bean.certNo}}</td>
                <td>{{bean.certName}}</td>
                <%--<td>{{vm.cached.OPCIF_AUTH_STATUS[bean.authStatus + '']}}</td>--%>
                <td>{{vm.getApplyDesc(bean.authStatus)}}</td>
                <%--<td>{{bean.description}}</td>--%>
                <td>{{bean.authChannel}}</td>
                <td>{{bean.applyDate | date:'yyyy-MM-dd HH:mm'}}</td>
                <td>{{bean.checkDate | date:'yyyy-MM-dd HH:mm'}}</td>
                <td>{{bean.auditor}}</td>
                <td>
                    <shiro:hasPermission name="merchant-info_auditpass">
                        <button type="button" ng-if='bean.authStatus == "APPLY_SUCCESS"' ng-click= "vm.auth(bean)" style="background:paleturquoise;">审核</button>
                    </shiro:hasPermission>
                    <shiro:hasPermission name="merchant-info_auditrefuse">
                        <button type="button" ng-if='bean.authStatus != "APPLY_SUCCESS"' ng-click= "vm.show(bean)">查看</button>
                    </shiro:hasPermission>
                </td>
            </tr>
            </tbody>
        </table>
    </div>

    <core:import url="../common/pageFoot.jsp"/>
</div>
<core:import url="../common/nav.jsp"/>
</body>
</html>
